char firstUniqueCharacter(const std::string & inputString)
{
    int  charCount[256]; // assumes ASCII!
    for( unsigned i = 0; i < 256; ++i)
        charCount[i] = 0;
    for( unsigned i = 0; i < inputString.length(); ++i)
        ++charCount[(int)inputString[i]];
    for( unsigned i = 0; i < inputString.length(); ++i)
    {
        if(charCount[(int)inputString[i]] == 1)
			return inputString[i];
    }
   return 0;
}
int main()
{
	string str("aaabbbabcdccc");	
	cout<<"first unique char :"<<firstUniqueCharacter(str)<<endl;
    return 0;
}